
#ifndef _APDU_LIB_FINGER_MGR_H_
#define _APDU_LIB_FINGER_MGR_H_

#include "../apdu.def/apdu_datatypes.h"

#define ENROLL_MODE_VERIFY  0
#define ENROLL_MODE_TEST	1
#define ENROLL_MODE_QUERY	2


#ifdef __cplusplus
extern "C" {
#endif
	
	int app_create_finger_record(HANDLE devHandle, int appId, int fingerNum, int enrollAccessLevel, 
								int userRetryTimes, int adminRetryTimes, int userVerifyLevel, int adminVerifyLevel);

	int app_enroll_finger(HANDLE devHandle, int appId, int userId, int phase, int fingerId);

	int app_verify_finger(HANDLE devHandle, int appId, int userId, int phase, int mode , int * fingerId,
						unsigned char desc[16], int * containerId, int * keyPair);

	int app_verify_finger_ex(HANDLE devHandle, int appId, int containerId, int keyPair, 
					int userId, int phase, int * fingerId);

	int app_verify_fingers(HANDLE devHandle, int appId, int userId, int phase, 
			int fingerIdNum, unsigned char * fingerIds,int * fingerId);

	int app_delete_finger(HANDLE devHandle, int appId, int userId, int fingerId);

	int app_get_finger_info(HANDLE devHandle,  int appId, int userId, int * useEnable,
						int * VerifyLevel, int * retryTimes, int * leftTimes, unsigned char * IDs, int *idLen);

	int app_get_finger_descriptor(HANDLE devHandle, int appId, int userId, int fingerId, 
						unsigned char desc[16], int * containerId, int * keyPair);

	int app_set_finger_descriptor(HANDLE devHandle, int appId, int userId, int fingerId, 
						unsigned char desc[16], int containerId, int keyPair);

	int app_clean_all_finger(HANDLE devHandle);

	int app_unblock_finger(HANDLE devHandle, int appid, int userId);
	
	int app_enable_finger(HANDLE devHandle,  int appId, int userId, int enable);

	int app_cancel_finger(HANDLE devHandle);

	int app_set_finger_mode(HANDLE devHandle, int mode, int regtimes);

#ifdef __cplusplus
}
#endif

#endif
